/**
 * 签到页面
 * author:zhangjlt
 * date:2017年3月13日11:30:42
 */
;
define(function(require, exports, module) {
	var wechat = require("wechat");

	var signIn = {
		/**
		 * bindEvent 页面事件
		 */
		bindEvent: function() {
			//返回
			$("#return_signIn").unbind().on("click", function() {
				window.location.href = "#home";
			});

		},
		/**
		 * 进行页面路由监听配置
		 * 
		 */
		bindRout: function() {
			//公共页面监听路由
			Path.map("#home").to(function() {
				//返回首页
				common.loadPage({
					pageUrl: "html/index.html",
					reload: true,
					from: "left"
				});
			});
			//公共页面监听路由
			Path.map("").to(function() {
				//返回首页
				common.loadPage({
					pageUrl: "html/index.html",
					reload: true,
					from: "left"
				});
			});
			Path.map("#/index/:page_name").to(function() {
				console.log(this.params["page_name"]);
				var page_name = this.params["page_name"];
				var nextPageFrom = "right"; //从右边过来
				//记录状态
				common.loadPage({
					pageUrl: "html/" + page_name + ".html",
					reload: true,
					from: nextPageFrom
				});
			});
			Path.listen();
		},

		/**
		 * 页面数据加载
		 */
		loadData: function() {
				///wxmember/service/
		},
		/**
		 * each page init mothed
		 */
		initialize: function() {

			this.loadData();
			//事件绑定
			this.bindEvent();
			//路由绑定
			this.bindRout();
		}
	};

	module.exports = signIn;
});



